<%@page language="java" contentType="text/html; charset=utf-8"	pageEncoding="utf-8"%>
<html>
<head>

<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script type="text/javascript">
var listUrl="warn/list.do";
var recognizeStatusJson;         
 
$(document).ready(function () {
	
	     

		 $("#warn-dg").datagrid({
			loadMsg : '数据加载中....',
			width : '100%',
			url : listUrl,
			nowrap : false,
			striped : true,
			remoteSort : false,
			rownumbers : true,
			pagination : false,
			fitColumns : true,
			
			/* pageList : [ 10, 15, 20, 25 ], */
			columns : [ [ {
				field : 'scheduleNo',
				title : '班号',
				width : 30
			}, {
				field : 'vehicleNo',
				title : '车辆',
				width : 30
			}, {
				field : 'result',
				title : '结果',
				width : 30,
				formatter: function(value,row,index){
					if (value == 2){
						return "替班";
					} else {
						return "陌生人";
					}
			    }
			}, {
				field : 'personName',
				title : '姓名',
				width : 30
			},{
				field : 'photo',
				title : '照片',
				width : 30,
				formatter:function(value,row){
					var host = location.host;
					return '<img src="http://'+host+'/recognizeLab/'+row.photo+'" width="40px">';
				}
			}
			, {
				field : 'createTime',
				title : '时间',
				width : 30
			}
			] ]
		});// end datagrid
		//设置分页控件
		/* var p = $('#warn-dg').datagrid('getPager');
		$(p).pagination({
			pageSize : 10,//每页显示的记录条数，默认为10
			pageList : [ 10, 15, 20, 25 ],//可以设置每页记录条数的列表
			beforePageText : '第',//页数文本框前显示的汉字
			afterPageText : '页    共 {pages} 页',
			displayMsg : '当前显示 {from} - {to} 条记录   共 {total} 条记录',
			onBeforeRefresh : function() {
				$(this).pagination('loading');
				$(this).pagination('loaded');
			}

		});//end pagination */
	
	}) 
	
	//end ready
	setInterval(function(){$('#warn-dg').datagrid('reload')},15*1000);
 
 </script>
</head>
<body>
		<div class="linkbar"><a>实时告警板</a></div>
		<br/>
		<br/>
		<div class="clear"></div>
		<div id="warn-dg"></div>

		
</body>
</html>